<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    div{
        width: 600px;
        height: 200px;
        background: #cbe446 url("images/banner.jpg") no-repeat center center;
        /* 背景大小
           background-size:x y;
           x-->width
           y-->height
           cover -->会覆盖整个div 特点：只能以大覆小  */
           background-size: 50% 100% ; }
    </style>
</head>
<body>
    <div>

    </div>
</body>
</html>